﻿@{
    ViewBag.Title = "保存消费种类配置";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@model JStore.Web.Controllers.CardTypes.ViewModels.SaveCardTypeModel
<link href="../../Scripts/jquery-validation-engine/css/template.css" rel="stylesheet"
    type="text/css" />
<link href="../../Scripts/jquery-validation-engine/css/validationEngine.jquery.css"
    rel="stylesheet" type="text/css" />
<script src="../../Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-validation-engine/js/jquery.validationEngine.js"
    type="text/javascript"></script>
<script src="../../Scripts/jquery-validation-engine/js/languages/jquery.validationEngine-zh_CN.js"
    type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $("#form1").validationEngine();
    });
</script>
<div class="right_box_card">
    <ul>
        <li class="right_box_card1"><a href="#">保存消费种类配置</a></li>
    </ul>
</div>
@using (Html.BeginForm("Save", "CardTypes", FormMethod.Post, new { @class = "formular", id = "form1" }))
{
    <table class="enter_tab" width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr height="40">
            <td class="entry_tab_td1">
                @Html.HiddenFor(c => c.Id)
                @Html.LabelFor(c => c.CardClass)
            </td>
            <td class="entry_tab_td2">
                @Html.DropDownListFor(c => c.CardClass, ViewData["CardClassList"] as List<SelectListItem>, new { @class = "validate[required]" })
            </td>
        </tr>
        <tr height="40">
            <td class="entry_tab_td1">
                @Html.LabelFor(c => c.UserTypeId)
            </td>
            <td class="entry_tab_td2">
                @Html.DropDownListFor(c => c.UserTypeId, ViewData["UserTypeList"] as List<SelectListItem>, new { @class = "validate[required]" })
            </td>
        </tr>
        <tr height="40">
            <td class="entry_tab_td1">
                @Html.LabelFor(c => c.CardName)
            </td>
            <td class="entry_tab_td2">
                @Html.TextBoxFor(c => c.CardName, new { @class = "text-input validate[required]" })
            </td>
        </tr>
        <tr height="40">
            <td class="entry_tab_td1">
                @Html.LabelFor(c => c.Price)
            </td>
            <td class="entry_tab_td2">
                @Html.TextBoxFor(c => c.Price, new { @class = "text-input validate[required,min[1]]" })
            </td>
        </tr>
        <tr height="40">
            <td class="entry_tab_td1">
                @Html.LabelFor(c => c.BalanceRate)
            </td>
            <td class="entry_tab_td2">
                @Html.TextBoxFor(c => c.BalanceRate, new { @class = "text-input validate[required,min[0.01],max[1]]" })
            </td>
        </tr>
        <tr height="40">
            <td class="entry_tab_td1">
                @Html.LabelFor(c => c.SaleRate)
            </td>
            <td class="entry_tab_td2">
                @Html.TextBoxFor(c => c.SaleRate, new { @class = "text-input validate[required]" })
            </td>
        </tr>
        <tr height="40">
            <td class="entry_tab_td1">
            </td>
            <td class="entry_tab_td2">
                <input type="submit" value="保存" class="submit" style="float: left;" />
            </td>
        </tr>
    </table> 
}
